
// jsUnit helper functions
function get(id)
{
	return document.getElementById(id);
}

function getM()
{
	var arr = [];
	var ids = arguments;
	var i, len = ids.length;
	for (i = 0; i < len; i++)
	{
		arr.push(document.getElementById(ids[i]));
	}
	
	return arr;
}

function checkArrays(a1, a2)
{
	var i, len = a1.length;
	for (i = 0; i < len; i++)
	{
		assertEquals('Element ' + i + ' from array1 is not equal to element ' + i + ' from array2', a1[i], a2[i]);
	}
	
	assertEquals('Lengths of array1 is not equal to that of array2', a1.length, a2.length);
}

function addClassAndVerify(gObj, stringToAdd, expectedResult)
{
	gObj.addClass(stringToAdd);
	assertEquals('Class name does not match expected after call to .addClass(..)', expectedResult, gObj.element().className);
}

function removeClassAndVerify(gObj, stringToRemove, expectedResult)
{
	gObj.removeClass(stringToRemove);
	assertEquals('Class name does not match expected after call to .removeClass(..)', expectedResult, gObj.element().className);
}